<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:61:"D:\phpStudy\WWW\auth/application/admin\view\member\index.html";i:1496201817;s:60:"D:\phpStudy\WWW\auth/application/admin\view\public\base.html";i:1496201816;}*/ ?>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="renderer" content="webkit">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<title>高级管理员</title>
		<meta name="keywords" content="">
		<meta name="description" content="">
		<!--[if lt IE 9]>
    	<meta http-equiv="refresh" content="0;ie.html" />
    	<![endif]-->
		<link rel="shortcut icon" href="favicon.ico">
		<link href="__CSS__/bootstrap.min.css" rel="stylesheet">
		<link href="__CSS__/font-awesome.min.css" rel="stylesheet">
		<link href="__CSS__/animate.min.css" rel="stylesheet">
		<link href="__CSS__/style.min.css" rel="stylesheet">
		<link href="__CSS__/admin.css" rel="stylesheet"><link href="__LIB__/fileinput/css/fileinput.min.css" rel="stylesheet" /> 
	</head>
	<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
		<div id="wrapper">
			<!--左侧导航开始-->
			<nav class="navbar-default navbar-static-side" role="navigation">
				<div class="nav-close"><i class="fa fa-times-circle"></i>
				</div>
				<div class="sidebar-collapse">
					<ul class="nav" id="side-menu">
						<li class="nav-header" style="height: 60px;padding: 0; text-align: center;line-height: 60px; color: #FFFFFF; font-size: 20px; ">
                               <strong><?php echo session('admin_name'); ?></strong>
						</li>
						<?php if(!empty($menu)): if(is_array($menu) || $menu instanceof \think\Collection): if( count($menu)==0 ) : echo "" ;else: foreach($menu as $key=>$vo): ?>
						<li class="menu">
							<a href="<?php echo $vo['name']; ?>">
								<i class="<?php echo $vo['icon']; ?>"></i>
								<span class="nav-label"><?php echo $vo['title']; ?> </span>
								<span class="fa arrow"></span>
							</a>
							<ul class="nav nav-second-level">
								<?php if(!empty($vo['children'])): if(is_array($vo['children']) || $vo['children'] instanceof \think\Collection): if( count($vo['children'])==0 ) : echo "" ;else: foreach($vo['children'] as $key=>$v): ?>
								<li>
									<a href="<?php echo url($v['name']); ?>"><?php echo $v['title']; ?></a>
								</li>
								<?php endforeach; endif; else: echo "" ;endif; endif; ?>
							</ul>
						</li>
						<?php endforeach; endif; else: echo "" ;endif; endif; ?>
					</ul>
				</div>
			</nav>
			<!--左侧导航结束-->
			<!--右侧部分开始-->
			<div id="page-wrapper" class="gray-bg dashbard-1">
				<div class="row border-bottom">
					<nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
						<div class="navbar-header">
							<a class="navbar-minimalize minimalize-styl-2 btn btn-primary" href="#">
								<i class="fa fa-bars"></i>
							</a>
						</div>
						<ul class="nav navbar-top-links navbar-left">
							<li class="hidden-xs" id='shouye'>
							<a href="<?php echo url('admin/index/index'); ?>">
								&nbsp;&nbsp;<i class="fa fa-home"></i>首页&nbsp;&nbsp;
							</a>
							</li>
							<li class="hidden-xs">
								<a href=<?php echo url('adminmall/UnionStore/index'); ?>>
									<i class="fa fa-users"></i>联盟商家</a>
							</li>
							<li>
								<a href=<?php echo url('adminmall/ConsMember/index',array('active'=>1)); ?>><i class="fa fa-user"></i>合伙人</a>
							</li>
							<li>
								<a href=<?php echo url('admin/Member/index',array('active'=>2)); ?>><i class="fa fa-user-plus"></i>加盟商申请</a>
							</li>
							<li>
								<a href=<?php echo url('adminmall/Scorec/index',array('active'=>3)); ?>><i class="fa fa-yen"></i>提现申请</a>
							</li>
							<li>
								<a href=<?php echo url('adminmall/Order/index',array('active'=>6)); ?>><i class="fa fa-shopping-cart"></i>订单管理</a>
							</li>
						</ul>
						<ul class="nav navbar-top-links navbar-right">
							<li class="hidden-xs">
								<a href="<?php echo url('system/clear'); ?>">
									<i class="fa fa-refresh"></i>清除缓存
								</a>
							</li>
							<li class="hidden-xs">
								<a href="<?php echo url('login/logout'); ?>"><i class="fa fa-sign-out"></i>退出系统</a>
							</li>
						</ul>
					</nav>
				</div>
				<div class="row">
					
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="<?php echo url('index/index'); ?>"><i class="fa fa-home"></i></a>
		</li>
		<li>  <strong> 会员列表 </strong> </li>
	</ol>
</div>
<div class="ibox float-e-margins">
	<div class="ibox-content">
	<form id="myForm" class="form-horizontal m-t" method="post" action="<?php echo url('index'); ?>">	
		<div class="form-group" >
				用户名称 <input type="text" id="name" name="name" value="" placeholder="请输入用户名称" class="bank"/>
				手机号码 <input type="text" id="mobile" name="mobile" value="" placeholder="请输入手机号" class="bank" />
			     <select name="type" class="bank" > 
         				<option value="0">请选择用户类型</option>
                        <option value="1">普通会员</option>
                        <option value="2">代理商</option>
                        <option value="3">合伙人</option>
                   </select>
				开始时间 <input id='start_time' name='add_time'style="width: 100px;"  onclick='WdatePicker()' type='text' placeholder="开始时间" class="bank" />
				至<input id='end_time' name='end_time'  style="width: 100px;" onclick='WdatePicker()' type='text' placeholder="结束时间" class="bank" />
				<select name="status" class="bank" > 
         				<option value="2">请选择用户状态</option>
                        <option value="1">激活</option>
                        <option value="0">未激活</option>
                </select>
				<span ><button type="submit" class="btn btn-sm btn-primary"><li class="fa fa-search"> 查询</li></button> </span>
				<a href="<?php echo url('export'); ?>" class="btn btn-primary btn-outline">导出会员信息</a></span>
		</div>
		</from>
		<div class="hr-line-dashed"></div>
		<div class="example-wrap">
			<div class="example">
				<form id="myForm1" method="post" action="<?php echo url('index'); ?>">
					<table class="table table-bordered table-hover">
						<thead>
							<tr class="long-th">
								<th>用户ID</th>
								<th>姓名</th>
								<th>手机号码</th>
								<th style="width:80px;">用户类型</th>
								<th style="width:80px;">合伙人ID</th>
								<th>上级</th>
								<th>一级</th>
								<th>二级</th>
								<th style="width:70px;">余额</th>
								<th style="width:70px;">积分</th>
								<th style="width:70px;">推广店铺数</th>
								<th>状态</th>
								<th>创建时间</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<?php if(is_array($list) || $list instanceof \think\Collection): if( count($list)==0 ) : echo "" ;else: foreach($list as $key=>$vo): ?>
							<tr>
								
								<td class="text-center"><?php echo $vo['id']; ?></td>
								<td class="text-center"><?php echo $vo['nick_name']; ?></td>
								<td class="text-center"><?php echo $vo['mobile']; ?></td>
								<td class="text-center">
                        			
                        			<?php if($vo['agent_type'] == 2 || $vo['agent_type'] == 1): ?>
                        			代理商
                        			<?php else: ?>
                        			合伙人	
                        			<?php endif; ?>
                        			
                        		</td>
                        		<td class="text-center"><?php echo $vo['pt_id']; ?>
									<a href="<?php echo url('edit',['id'=>$vo['id'], 'status'=>$vo['status']]); ?>" class="btn btn-primary bnt-sm ajax-do">
									设置
									</a>
                        		</td>
								<td class="text-center" style="width:70px;">
									<?php echo $vo['pid']; ?><a href="<?php echo url('edit',['id'=>$vo['id'], 'status'=>$vo['status']]); ?>" class="btn btn-primary bnt-sm ajax-do">
									 设置
									</a>
								</td>
								<td class="text-center"><?php if($vo['le1']): ?><?php echo $vo['le1']; else: ?>0<?php endif; ?></td>
								<td class="text-center"><?php if($vo['le2']): ?><?php echo $vo['le2']; else: ?>0<?php endif; ?></td>
								<td class="text-center"><span id="balance_<?php echo $vo['id']; ?>"><?php echo $vo['credit2']; ?></span>
									<input type="button" value="充值" id="credit2"class="btn btn-primary bnt-sm" onclick="chongzhi_member(<?php echo $vo['id']; ?>,2)">
								</td>
								<td class="text-center"><span id="score_<?php echo $vo['id']; ?>"><?php echo $vo['credit1']; ?></span>
									<input type="button" value="充值" id="credit1"class="btn btn-primary bnt-sm" onclick="chongzhi_member(<?php echo $vo['id']; ?>,1)">
								</td>
								<td class="text-center"><?php echo $vo['store_num']; ?>
									<input type="button" value="设置" id="credit1"class="btn btn-primary bnt-sm" onclick="storenum(<?php echo $vo['id']; ?>)">
								</td>
								<td class="text-center">
                        			                      			
										<?php if($vo['status'] == 0): ?>
	                        			<a href="<?php echo url('edit',['id'=>$vo['id'], 'status'=>$vo['status']]); ?>" class="btn btn-primary bnt-sm ajax-do">
										<i class="fa fa-paste"></i>激活   
	                        			<?php else: ?>
	                        			<a href="<?php echo url('edit',['id'=>$vo['id'], 'status'=>$vo['status']]); ?>" class="btn btn-danger bnt-sm ajax-do">
										<i class="fa fa-paste"></i>冻结   
	                        			<?php endif; ?></a>
                        		</td>
								<td class="text-center"><?php echo $vo['add_time']; ?></td>
								<td class="text-center">
									<a href="<?php echo url('update',['id'=>$vo['id']]); ?>" class="btn btn-primary bnt-sm">
										<i class="fa fa-paste"></i> 编辑</a>
									
								</td>
							</tr>
							<?php endforeach; endif; else: echo "" ;endif; ?>
						</tbody>
					</table>
					<div style="text-align: right;">

                    </div>
				</form>
			</div>
		</div>
	</div>
</div>

				</div>
			</div>
			<!--右侧部分结束-->
		</div>
		<div class="footer">
			<div class="pull-right"> 版权所有CMS Project &copy; 2017-2020 版权所有</div>
		</div>
		<script src="__JS__/jquery.min.js"></script>
		<script src="__JS__/bootstrap.min.js"></script>
		<script src="__JS__/jquery.metisMenu.js"></script>
		<script src="__JS__/jquery.slimscroll.min.js"></script>
		<script src="__LIB__/layer/layer.js"></script>
		<script src="__JS__/core.min.js"></script>
		<script src="__JS__/pace.min.js"></script>
		<script src="__JS__/help.js"></script>
		<script>
			// 文件上传URL
			var __UPLOAD_URL__ = "<?php echo url('admin/upload/index'); ?>";
			var __CURRENT_URL__ = "<?php echo $current_url; ?>";
		</script>
		<script src="__JS__/admin.js"></script>
		<script>
			var show="<?php echo $is_show_left; ?>";
			if(show==0){
				$("body").toggleClass("mini-navbar"), SmoothlyMenu();
			}
		</script>
		
<script src="__JS__/jquery.form.js"></script>
<script src="__LIB__/validate/jquery.validate.min.js"></script>
<script src="__LIB__/validate/messages_zh.min.js"></script>
<script src="__LIB__/validate/add_validate.min.js"></script>
<script src="__LIB__/fileinput/js/fileinput.min.js"></script>
<script src="__LIB__/fileinput/js/locales/zh.js"></script>
<script src="__LIB__/datepicker/WdatePicker.js"></script>
<script>
	$(function() {
		$("#myForm1").validate({
			rules: {
				
			},
			messages: {
				
			},
			submitHandler: function(form) {
				ajaxForm();
			}
			
		});
	});
	
	
	
	
	function storenum(id){
		var tel=parent.layer.prompt({title: '输入店铺数',formType: 0}, 
	    function(integral){layer.open({content: '确认店铺数为'+integral+'？',
					btn: ['确认', '取消'],yes: function(index, layero) {window.location.href='storenum/id/'+id+'/integral/'+integral;},
													btn2: function(index,layero) {},
						                        cancel: function() {
						                            //右上角关闭回调  
						                      }
				});
		});
	}

</script>
<style>
.bank{
	width: 150px;
    height:30px;
    text-align:center;
    border-radius:5px;
    display:inline;
}
</style>

	</body>

</html>